 function getLocation() {
    navigator.geolocation.getCurrentPosition(showInfo);
  }
  function showInfo(position) {
    var latitude = position.coords.latitude;
    var longitude = position.coords.longitude;
    var accuracy = position.coords.accuracy;
    $('#someElm').html("latitude: "+latitude+"<br />longitude "+longitude+"<br />accuracy: "+accuracy);
  }
  getLocation();